// -----------------------------------------------------------------------
//  <copyright file="EventSourcedEvent.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2025 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2025/1/6 23:10</last-date>
// -----------------------------------------------------------------------

namespace DaprPlus.EntityFrameworkCore;

/// <summary>
/// 实体类：事件溯源事件
/// </summary>
[Description("事件溯源事件")]
public class EventSourcedEvent : EntityBase
{
    /// <summary>
    /// 获取或设置聚合根Id。
    /// </summary>
    public long AggregateRootId { get; set; }

    /// <summary>
    /// 获取或设置事件类型。
    /// </summary>
    public required string EventType { get; set; }

    /// <summary>
    /// 获取或设置事件发生时间。
    /// </summary>
    public DateTime CreatedTime { get; set; }

    /// <summary>
    /// 获取或设置事件数据。
    /// </summary>
    public string? Data { get; set; }

    /// <summary>
    /// 获取或设置版本号。
    /// </summary>
    public int Version { get; set; }

    /// <summary>
    /// 获取或设置元数据。
    /// </summary>
    public string? Metadata { get; set; }
}
